package com.east.service.staff;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.east.bean.Staff;
import com.east.controller.staff.StaffExecl;
import com.east.controller.staff.StaffParameter;
import com.east.utils.Pagenation;
import com.github.pagehelper.Page;

public interface StaffService {
	/**
	 * 员工全查
	 * @param pagenation
	 * @param key
	 * @param status
	 * @return
	 */
	Page<Staff> findByAll(Pagenation pagenation,String key,String status);
	
	/**
	 * 根据部门id查找员工
	 * @param pagenation
	 * @param dId
	 * @return
	 */
	Page<Staff> findByDepartMentId(Pagenation pagenation,Integer dId );
	/**
	 * 详情
	 * @param staff
	 * @return
	 */
	Staff findByStaff(Staff staff);
	/**
	 * 添加
	 * @return
	 */
	int savaStaff(StaffParameter sp);
	/**
	 * 修改
	 * @return
	 */
	int updateStaff(StaffParameter sp);
	/**
	 * 删除
	 * @param staff
	 * @return
	 */
	int delStaff(Staff staff);
	
	//=============================员工统计===========================
	/**
	 * 员工统计全查
	 * @param pagenation
	 * @param key
	 * @param did
	 * @return
	 */
	Page<StaffExecl> findByTall(Pagenation pagenation,String key,String did,String status);
	/**
	 * 员工统计全查
	 * @param pagenation
	 * @param key
	 * @param status
	 * @return
	 */
	List<StaffExecl> findByTall(String key,String did,String status);
	
	/**
	 * 年龄统计
	 * @return
	 */
	Map<String, Object> findByAge();
	/**
	 * 岗位年限统计
	 * @return
	 */
	Map<String, Object> findByPosition();
	/**
	 * 本公司在职年限统计
	 * @return
	 */
	Map<String, Object> findByJob();
	
	/**
	 * 部门人数统计
	 * @return
	 */
	Object findByJobDepartMent();
	
	void execlSelf(HttpServletRequest request,HttpServletResponse response,String key,String did,String status);
	
}
